package com.example.server.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.server.bean.Admin;
import com.example.server.util.RespBean;
import com.example.server.bean.Role;
import org.springframework.security.core.Authentication;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 别怿言
 * @since 2023-02-03
 */
public interface IAdminService extends IService<Admin> {

    RespBean login(String username, String password, String code, HttpServletRequest request);

    Admin getAdminByUserName(String username);

    List<Role> getRolesByAdminId(Integer id);

    List<Admin> getAllAdmins(String keyword);

    RespBean updateAdminPass(String oldPass, String pass, Integer adminId);

    RespBean updateUserface(String url, Integer id, Authentication authentication);

}
